package com.ruoyi.web.controller.admin.app;

import com.ruoyi.admin.domain.LlmAppSettingParam;
import com.ruoyi.admin.service.app.LlmAppSettingsParamService;
import com.ruoyi.common.core.domain.AjaxResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@Slf4j
@RestController
@RequestMapping("/knowledge/api/appSettingsParam")
@RequiredArgsConstructor
public class LlmAppSettingParamController {

    private final LlmAppSettingsParamService llmAppSettingsParamService;

    @PostMapping("/add")
    public AjaxResult add(@RequestBody @Valid LlmAppSettingParam llmAppSettingParam) {
        return llmAppSettingsParamService.addAppSettingParam(llmAppSettingParam) ? AjaxResult.success() : AjaxResult.error();
    }

}
